import React, { useState } from 'react';
import { Drawer } from 'antd';
import { useModel, MicroAppWithMemoHistory } from 'umi';

const AppDrawer: React.FC = () => {
  const { showApp2, setQiankunShowApp2 } = useModel('@@qiankunStateForSlave') || {};
  const onClose = () => {
    setQiankunShowApp2(false);
  };
  return (
    <>
      <Drawer title="Basic Drawer" placement="right" onClose={onClose} visible={showApp2}>
        <MicroAppWithMemoHistory name='app2' url='/home' />
      </Drawer>
    </>
  );
};

export default AppDrawer